package com.example.springevent.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 通用事件 - 可以携带任何类型的数据
 */
@Getter
public class GenericEvent<T> extends ApplicationEvent {
    
    private final T data;
    private final String eventType;
    
    public GenericEvent(Object source, T data, String eventType) {
        super(source);
        this.data = data;
        this.eventType = eventType;
    }
}